package com.guangyunl.a_extends;

public class Test01 {
    public static void main(String[] args) {
        Teacher teacher = new Teacher();
        teacher.name = "张三";
        teacher.age = 18;
        System.out.println("teacher.name+teacher.age = " + teacher.name + teacher.age);
        teacher.work();
//        teacher.eat()   //子类继承父类之后不能使用父类私有成员，只能使用父类非私有成员


        Manager manager = new Manager();
        manager.name = "李四";
        manager.age  = 19;
        System.out.println("manager.name+manager.age = " + manager.name + manager.age);
        manager.work();
    }
}
/*
teacher.name+teacher.age = 张三18
就是爱工作
manager.name+manager.age = 李四19
就是爱工作
 */